package kz.edu.sdu.atm.client;

import java.math.BigDecimal;

import kz.edu.sdu.atm.util.Logger;

public class Main {

	static Logger log = new Logger(Main.class);
	static String host = "localhost";
	static int port = 12345;

	public static void main(String[] args) throws Exception {
		// if (args.length < 2) {
		// log.error("Invalid arguments specified: <host> <port> must be!");
		// // return;
		// } else {
		// host = args[0];
		// port = Integer.parseInt(args[1]);
		// }
		// System.setProperty("atm.host", host);
		// System.setProperty("atm.port", "" + port);
		Client c = new Client("localhost", 12345);
		if (c.auth("german", "z")) {
			log.debug("OK");
			log.debug(c.balance("german", "q").toPlainString());
			log.debug(c.deposit("german", "q", new BigDecimal("123"))
					.toPlainString());
		}
	}

}
